package cn.edu.niit.server.service;

import cn.edu.niit.server.domain.ContentInfo;
import java.util.Optional;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * Service Interface for managing {@link ContentInfo}.
 */
public interface ContentInfoService {
    /**
     * Save a contentInfo.
     *
     * @param contentInfo the entity to save.
     * @return the persisted entity.
     */
    ContentInfo save(ContentInfo contentInfo);

    /**
     * Partially updates a contentInfo.
     *
     * @param contentInfo the entity to update partially.
     * @return the persisted entity.
     */
    Optional<ContentInfo> partialUpdate(ContentInfo contentInfo);

    /**
     * Get all the contentInfos.
     *
     * @param pageable the pagination information.
     * @return the list of entities.
     */
    Page<ContentInfo> findAll(Pageable pageable);

    /**
     * Get the "id" contentInfo.
     *
     * @param id the id of the entity.
     * @return the entity.
     */
    Optional<ContentInfo> findOne(Long id);

    /**
     * Delete the "id" contentInfo.
     *
     * @param id the id of the entity.
     */
    void delete(Long id);

    Page<ContentInfo> findByType(Long typeId, Integer page, Integer size);

    /**
     * 根据用户登录名获取用户发布的海报列表
     * @param login 登录名
     * @param page 页码
     * @param size 页长
     * @return 海报分页列表
     */
    Page<ContentInfo> getMyContent(String login, Integer page, Integer size);
}
